package 剑指;

import java.util.HashSet;
import java.util.Set;

public class offer48 {
    //public int lengthOfLongestSubstring(String s) {
        /*if(s.length() <= 1) return s.length();
        Set<Character> set = new HashSet<>();
        int maxLength = 0;
        for (int i = 0; i < s.length(); i++) {
            if(!set.add(s.charAt(i))){
                maxLength = Math.max(maxLength,set.size());
                set.clear();
                set.add(s.charAt(i));
            }
        }
        return Math.max(set.size(),maxLength);*/
    //}
}
